Fixed a bug with flamingo
aFixed in its entirety for original function