Create ceiling/floorplan output as function?

Hey I am looking for some advice on a problem I am having here – I was able to get this to work before but when I turned my code into a custom block I started getting an error:

for some reason when I am having dynamo create a ceiling plan/floor plan from a level, in the next node it claims that the output is a function as opposed to an element? Is there any reason for this and is there a way for me to work around it??