empty() made some problems - should work now

Found it here: http://stackoverflow.com/questions/1075534/cant-use-method-return-value-in-write-context