Fixed bug + improved syntax

I haven't brunched the code on purpose since others improvements will be needed today.