     res = @getFromBuffer scope, idx
     return res if res isnt undefined
     # Try to find an IIP instead
-    @getFromBuffer null, idx, true
+    return @getFromBuffer null, idx, true
 
   hasIPinBuffer: (scope, idx, validate, initial = false) ->
     buf = @getBuffer scope, idx, initial
     return false unless buf?.length
     for packet in buf
       return true if validate packet
-    false
+    return false
 
   hasIIP: (idx, validate) ->
-    @hasIPinBuffer null, idx, validate, true
+    return @hasIPinBuffer null, idx, validate, true
 
   # Returns true if port contains packet(s) matching the validator
   has: (scope, idx, validate) ->

      @handleSocketEvent 'disconnect', socket, localId
    socket.on 'ip', (ip) =>
      @handleIP ip, localId

  handleIP: (ip, id) ->
    return if @options.control and ip.type isnt 'data'

#
# Input Port (inport) implementation for NoFlo components. These
# ports are the way a component receives Information Packets.
module.exports = class InPort extends BasePort
  constructor: (options = {}) ->
    options.control ?= false
    options.scoped ?= true
